﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="malltemplet_list.aspx.cs" Inherits="SF.Ucenter.admin.modeconfig.malltemplet_list" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>商城模版</title>
    <link href="../../scripts/artdialog/ui-dialog.css" rel="stylesheet" type="text/css" />
    <link href="../skin/default/style.css" rel="stylesheet" type="text/css" />
    <link href="css/modeconfig.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/artdialog/dialog-plus-min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
    <script type="text/javascript">
        var oldid = null;//定义全局id
        //传值过来
        var id = 0;
        $(function () {
            id = document.getElementById("txtSelectTemplateId").value;
            $("#div" + id).attr("class", "templatelidiv1");
            $("#rad" + id).attr("checked", "checked");
            var list = $('input:radio[name="gTemplate"]:checked').attr("tip");
            if (list != null) {
                var a = list;
                document.getElementById("hidden").value = a;
            }
            
        });
        function AuditPostBack(objId, objmsg) {
            var list = $('input:radio[name="gTemplate"]:checked').attr("tip");
            if (list != null) {
                var a = list;
                document.getElementById("hidden").value = a;
            }
        }
        //样式切换
        function addclass(id) {
            if (oldid != null) {
                $("#div" + oldid).attr("class", "templatelidiv");
            }
            oldid = id;
            $("#div" + id).attr("class", "templatelidiv1");
        }

    </script>
</head>

<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a class="home"><i></i><span>商城模板</span></a>
            <asp:TextBox ID="txtSelectTemplateId" runat="server" Text="0" Style="display: none;"></asp:TextBox>
            <input id="hidden" type="hidden" runat="server" />
            <input id="hidden1" type="hidden" runat="server" />
            <input id="hiddenGoodsType" type="hidden" runat="server" />
        </div>
        <!--/导航栏-->

        <div style="margin-top: 2px;">
            <asp:Label runat="server" ID="lbl" Font-Size="12px"></asp:Label>
        </div>
        <!--tab-->

        <div id="floatHead" class="content-tab-wrap">
            <div class="content-tab">
                <div class="content-tab-ul-wrap">
                    <ul>
                        <li><a class="selected" href="javascript:;">模版选择</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <!--/tab-->
        <div class="tab-content">
            <!--图片列表-->
            <asp:Repeater ID="rptPreview" runat="server">
                <HeaderTemplate>
                    <div class="templatelist" style="width: 1000px; margin: 0 auto;">
                        <ul>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <div id="<%#"div"+Eval("id")%>" class="templatelidiv">
                            <label onclick="addclass('<%#Eval("id")%>');" for='<%#"rad"+Eval("id")%>'>
                                <asp:Image ID="Image1" runat="server" ImageUrl=' <%#Eval("imgurl")%>' />

                                <div class="templateName" style="height: 20px; padding-top: 5px;">
                                    <%# "<input id=\"rad"+Eval("id")+"\" type=\"radio\" name=\"gTemplate\" goodstype=\""+getType(Eval("id").ToString())+"\" tip=\""+Eval("id")+"\" /> "%>
                                    <%#Eval("settingname")%>
                                </div>
                            </label>
                        </div>
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <%#rptPreview.Items.Count == 0 ? "<div align=\"center\" style=\"font-size:12px;line-height:30px;color:#666;\">暂无模版</div>" : ""%>
              </ul>
            </div>
                </FooterTemplate>
            </asp:Repeater>
            <!--/图片列表-->
        </div>

        <!--工具栏-->
        <div class="page-footer">
            <div class="btn-list">
                <asp:Button ID="btnSave" runat="server" Text="提交保存" CssClass="btn" OnClientClick="return AuditPostBack('btnSave');" OnClick="btnSave_Click" />
                <%--<asp:Button ID="Button1" runat="server" Text="提交保存" CssClass="btn" OnClick="btnSave_Click" />--%>
                <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript: history.back(-1);" />
            </div>
            <div class="clear"></div>
        </div>
        <!--/工具栏-->
    </form>
</body>
</html>

